package com.summer.mall.util;

import com.summer.mall.entity.Result;

public class ResultUtil {

    public static Result success(Object object) {
        return new Result(true, "success", object);
    }

    public static Result success() {
        return success(null);
    }

    public static Result failure(String msg) {
        return new Result(false, msg, null);
    }

    public static Result successWithSessionId(Object object, String sessionId) {
        return new Result(true, "success", object, sessionId);
    }
}
